//
//  LogHelper.swift
//  Employee
//
//  Created by swordjoy on 2017/3/31.
//  Copyright © 2017年 remotevillage. All rights reserved.
//

import Foundation

struct LogHelper {
  
  static func verifyUsername(with string: String) -> Bool {
    guard !string.isEmpty else {
      SJHint.show("请填写用户名")
      return false
    }
  
    return true
    
  }
  
  static func verifyPassword(with string: String) -> Bool {
    
    guard !string.isEmpty else {
      SJHint.show("请填写密码")
      return false
    }
    
    guard string.sj.length >= 6 else {
      SJHint.show("密码长度至少为6位")
      return false
    }
    
    guard string.sj.length <= 16 else {
      SJHint.show("密码长度最多为16位")
      return false
    }
    
    return true
    
  }
  
}
